package com.bba.manager.user;

import com.bba.manager.common.model.user.Customer;
import com.bba.manager.common.model.user.VO.query;
import com.bba.manager.common.util.ResponseVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.cloud.openfeign.SpringQueryMap;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(name = "car-user-service", path = "/customer",contextId = "customerFeign")
public interface customerFeign {
    @GetMapping("/addCustomer")
    public ResponseVO addCustomer(@SpringQueryMap Customer customer);
    //根据客户身份证删除客户信息
    @PostMapping("/deleteCustomer")
    public ResponseVO deleteCustomer(@RequestBody Customer customer);
    //分页查询客户
    @GetMapping("/getList")
    public ResponseVO listCustomer(@SpringQueryMap query query);
    //根据姓名查询客户
    @GetMapping("/listCustomerByName")
    public ResponseVO listCustomerByName(@RequestParam String name);
    //修改客户信息
    @PostMapping("/update")
    public ResponseVO updateCustomer(@RequestBody Customer customer);
    //获取所有用户信息
    @GetMapping("/list")
    public ResponseVO list();
}
